hysop.backend.host.python.operator.curl module¶
- class hysop.backend.host.python.operator.curl.PythonSpectralCurl(**kwds)[source]¶
Bases:
SpectralCurlOperatorBase
,HostOperator
Compute the curl by using an python FFT backend.
Create an operator that computes the curl of an input field Fin.
Given Fin, a 2D ScalarField, a 2D VectorField or a 3D VectorField, compute Fout = curl(Fin).
- Only the following configurations are supported:
dim nb_components | dim nb_components
Input: 2 (1,2) | 3 3 Output: 2 (2,1) | 3 3
- Parameters:
Fin (hysop.field.continuous_field.Field) – Continuous field as input ScalarField or VectorField. All contained field have to live on the same domain.
Fout (hysop.field.continuous_field.Field) – Continuous field as output VectorField. All contained field have to live on the same domain.
variables (dict) – dictionary of fields as keys and topologies as values.
kwds (dict, optional) – Extra parameters passed towards base class (MultiSpaceDerivatives).
- apply(**kwds)¶
Abstract method that should be implemented. Applies this node (operator, computational graph operator…).
- setup(work)[source]¶
Setup temporary buffer that have been requested in get_work_properties(). This function may be used to execute post allocation routines. This sets self.ready flag to True. Once this flag is set one may call ComputationalGraphNode.apply() and ComputationalGraphNode.finalize().
Automatically honour temporary field memory requests.